package interfaces

import (
	"octopus/internal/domain/entities"
)

// TaskEvent 任务事件类型
type TaskEvent string

const (
	TaskEventCompleted TaskEvent = "task.completed"
)

// EventBus 定义了事件总线的接口
type EventBus interface {
	Publish(event TaskEvent, payload interface{})
	Subscribe(event TaskEvent, handler func(interface{})) error
}

// TaskEventPayload 定义了任务事件的载荷结构
type TaskEventPayload struct {
	Task *entities.Task
}